#pragma once
#ifndef __EVENT_MANAGER_INCLUDED__HH__
#define __EVENT_MANAGER_INCLUDED__HH__

#include <LitEvent.h>
#include <LitCoreComponent.h>
#include <LitListener.h>

namespace Lit
{
	class EventManager  : public CoreComponent, public ListenerManager
	{
	public:
		typedef std::vector<EventPtr>				EventList;

	protected:
		EventList		mEvents;
		
	public:
		EventManager();
		~EventManager();

		Type type() const{ return COM_EVENTMANAGER;	} 

		bool renderOneFrame( float dt );
		void shutdown( );

		void	pushEvent( EventPtr evt );
		size_t	numEvents() const;
		
		void	propagate( EventPtr evt );
		void	flush( );
	};
};

#endif